﻿@model Janus.Mes.VO.SysConfigVO
@using Janus.Mes.WebClient;
@using Janus.BaseEntitys;
@using Janus.Mes.VO;
@*@model RolersVO*@

@{
    Layout = null;
    //var Modules = ViewData["Modules"] as List<ModuleDTO>;
    //var CurentUser = Session["CurentUser"] as CurrentUserDTO;
    //var i = 1;
    ////var rolesPrivStr = new List<string>(Model.SelectedModules ?? new List<string>());
    //var parentModels = Modules.Where(c => string.IsNullOrEmpty(c.Parent)).OrderBy(c => c.Order);
    //string code = ViewData["code"] as string;

    //string selectedvalue = Model.Id != 0 ? code : Model.Creator;
}
<script>
    function ShowDept(currentId) {
        $(".Dept").hide();
        $("#" + currentId).show();
    }
</script>
<div class="pageContent">
    <form method="post" action="Quality/ProcessCheck/Create?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
          onsubmit="return validateCallback(this, dialogAjaxDone);">
        @Html.ValidationSummary(true)
        <div class="pageFormContent" layouth="56">
            <p>
                <label>
                    报工单号
                </label>
                @Html.TextBox("Title", ViewData["Title"])
            </p>
            <p>
                <label>
                    报工方式
                </label>
                <select id="type" style="width:160px">
                    <option value="1">手动报工</option>
                    <option value="2">自动报工</option>
                </select>
            </p>
            <p>
                <label>
                    报工日期
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>排程单号</label>
                @Html.SelectRolers(new { @class = "treetable select3", @name = "ParentID", id = "ParentID", selectedvalue = "1" })
                @Html.ValidationMessageFor(model => model.Id)
            </p>
            <p>
                <label>
                    生产日期
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    班别
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    工艺路线
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            <p>
                <label>
                    工艺路线名称
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    工作中心
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    工作中心名称
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    工序编码
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    工序名称
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    工作单元
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    工作单元名称
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p style="width:100%">
                <label>
                    加工描述
                </label>
                <input type="text" style="width:915px" />
            </p>
            <p>
                <label>
                    开始时间
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    结束时间
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    排程数量
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    排程完成数量
                </label>
                @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
            </p>
            <p>
                <label>
                    报工数量
                </label>
                @Html.TextBox("test", "")
            </p>
            <p>
                <label>
                    自制不良
                </label>
                @Html.TextBox("test", "")
            </p>
            @*<p>
                    <label>
                        良品数量
                    </label>
                    @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
                </p>
                <p>
                    <label>
                        不良数量
                    </label>
                    @Html.TextBoxFor(sysConfig => sysConfig.Key, new { @Readonly = "true" })
                </p>*@
            <p style="width:100%">
                <label>
                    备注
                </label>
                <input type="text" style="width:915px" />
            </p>
            <div class="tabs" style="float:left;width:100%;">
                <div class="tabsHeader">
                    <div class="tabsHeaderContent">
                        <ul>
                            <li class="selected"><a href="#"><span>使用设备</span></a></li>
                            <li><a href="#"><span>参与人员</span></a></li>
                            @* <li><a href="#"><span>品质情况</span></a></li>*@
                            <li><a href="#"><span>损失工时</span></a></li>
                            <li><a href="#"><span>物料消耗</span></a></li>
                        </ul>
                    </div>
                </div>
                <div class="tabsContent" style="height:240px; overflow:scroll;">
                    <div>
                        <table class="list nowrap itemDetail" isrownum="false" addbutton="新增" width="100%" style="clear: both;">
                            @*<table class="treetable list" width="100%">*@
                            <thead>
                                <tr class="header">
                                    <th>项次</th>
                                    <th>设备类别</th>
                                    <th>设备代号</th>
                                    <th>设备名称</th>
                                    <th>使用数量</th>
                                    <th>使用位置</th>
                                    <th>备注</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr target="ProcessCheck_id" rel="2" data-tt-id="2">
                                    <td>项次</td>
                                    <td>设备类别</td>
                                    <td>设备代号</td>
                                    <td>设备名称</td>
                                    <td>使用数量</td>
                                    <td>使用位置</td>
                                    <td>备注</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                        <table class="list nowrap itemDetail" isrownum="false" addbutton="新增" width="100%" style="clear: both;">
                            @*<table class="treetable list" width="100%">*@
                            <thead>
                                <tr class="header">
                                    <th>项次</th>
                                    <th>工号</th>
                                    <th>姓名</th>
                                    <th>职务</th>
                                    <th>直接/间接人员</th>
                                    <th>生产数量</th>
                                    <th>工时比例</th>
                                    <th>备注</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr target="ProcessCheck_id" rel="2" data-tt-id="2">
                                    <td>项次</td>
                                    <td>工号</td>
                                    <td>姓名</td>
                                    <td>职务</td>
                                    <td>直接/间接人员</td>
                                    <td>生产数量</td>
                                    <td>工时比例</td>
                                    <td>备注</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    @*<div>
                        <table class="list nowrap itemDetail" isrownum="false" addbutton="新增" width="100%" style="clear: both;">
                            <thead>
                                <tr class="header">
                                    <th>项次</th>
                                    <th>品质类别</th>
                                    <th>不良代码</th>
                                    <th>不良描述</th>
                                    <th>不良数量</th>
                                    <th>备注</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr target="ProcessCheck_id" rel="2" data-tt-id="2">
                                    <td>项次</td>
                                    <td>品质类别</td>
                                    <td>不良代码</td>
                                    <td>不良描述</td>
                                    <td>不良数量</td>
                                    <td>备注</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>*@
                    <div>
                        <table class="list nowrap itemDetail" isrownum="false" addbutton="新增" width="100%" style="clear: both;">
                            @*<table class="treetable list" width="100%">*@
                            <thead>
                                <tr class="header">
                                    <th>项次</th>
                                    <th>损失类别名称</th>
                                    <th>损失代码</th>
                                    <th>损失描述</th>
                                    <th>开始时间</th>
                                    <th>结束时间</th>
                                    <th>合计时长th>
                                    <th>责任单位</th>
                                    <th>备注</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr target="ProcessCheck_id" rel="2" data-tt-id="2">
                                    <td>项次</td>
                                    <td>损失类别名称</td>
                                    <td>损失代码</td>
                                    <td>损失描述</td>
                                    <td>开始时间</td>
                                    <td>结束时间</td>
                                    <td>合计时长td>
                                    <td>责任单位</td>
                                    <td>备注</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div>
                        <table class="list nowrap itemDetail" isrownum="false" addbutton="新增" width="100%" style="clear: both;">
                            @*<table class="treetable list" width="100%">*@
                            <thead>
                                <tr class="header">
                                    <th>项次</th>
                                    <th>料号</th>
                                    <th>品名规格</th>
                                    <th>单位</th>
                                    <th>标准用量</th>
                                    <th>所需数量</th>
                                    <th>实际耗用</th>
                                    <th>备注</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr class="selected" target="ProcessCheck_id" rel="2" data-tt-id="2" onclick="ShowDept('Dept0')">
                                    <td>项次</td>
                                    <td>料号</td>
                                    <td>品名规格</td>
                                    <td>单位</td>
                                    <td>标准用量</td>
                                    <td>所需数量</td>
                                    <td>实际耗用</td>
                                    <td>备注</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            @Html.Partial("Operation", Model)
        </div>
    </form>
    @Html.Partial("FormButtonBar")
</div>
